From: Alessandro Bono Date: Fri, 14 Oct 2022 22:16:16 +0000 (+0200) Subject: environment: Preserve time 0 when animations are disabled X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~435^2^2~24 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=ee09c5c85312f571e14abe69bb6674a361c16d65;p=gnome-shell.git environment: Preserve time 0 when animations are disabled There are cases where the animation time is set to 0 on purpose in order to not animate. When animations are disabled via /org/gnome/desktop/interface/enable-animations those animation times are increased from 0 to 1. This makes the "Caps lock is on." message appear unconditionally in the lockscreen for a brief moment. Select the minimum between the two values. So that an animation time 0 is preserved instead of being replaced by 1. Part-of: --- diff --git a/js/ui/environment.js b/js/ui/environment.js index 4853a83d5..8c790da67 100644 --- a/js/ui/environment.js +++ b/js/ui/environment.js @@ -464,7 +464,7 @@ function adjustAnimationTime(msecs) { let settings = St.Settings.get(); if (!settings.enable_animations) - return 1; + return Math.min(msecs, 1); return settings.slow_down_factor * msecs; }